import { createRouter, createWebHistory } from 'vue-router'
import Player from "../components/Player/PlayerCom.vue"
import Historylist from "../views/Historylist/HistoryList.vue"
import Playlist from "../views/Playlist/PlayList.vue"
import Search from "../views/Search/SearchList.vue"
import Toplist from "../views/Toplist/TopList.vue"
import Userlist from "../views/Userlist/UserList.vue"
import MusicList from "../views/MusicList/MusicList.vue"
import CommentCom from "../views/Comment/CommentCom.vue"
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'player',
      component: Player,
      redirect: '/playlist',
      children: [
        {
          path: "playlist",
          name: 'playlist',
          component: Playlist
        },
        {
          path: "toplist",
          name: 'toplist',
          component: Toplist
        },
        {
          path: "search",
          name: 'search',
          component: Search
        },
        {
          path: "userlist",
          name: 'userlist',
          component: Userlist
        },
        {
          path: "historylist",
          name: 'historylist',
          component: Historylist
        },
        {
          path: "details/:id",
          name: 'musiclist',
          component: MusicList
        },
        {
          path: "comment/:id",
          name: 'commentcom',
          component: CommentCom
        },
      ]
    },

  ]
})

export default router
